﻿using System;
using System.Windows.Forms;
using VideoClub.Business;
using VideoClub.Business.Consultas;

namespace VideoClub.UI.Reportes
{
    public partial class FrmReporte5 : Form
    {
        public FrmReporte5()
        {
            InitializeComponent();
        }

        private void Consultar_Click(object sender, EventArgs e)
        {
            String director,formato;
            if (txtDirector.Text == "")
                director = "";
            else
            {
                director = "%"+txtDirector.Text + "%";
            }
            formato = cboFormato.Text;
            dgvConsulta1.DataSource=ConsultasBO.ObtenerTodosLosDatosConsulta5(director, formato);

        }

        private void FrmReporte1_Load(object sender, EventArgs e)
        {
            cboFormato.DataSource = DatosComunesBO.ObtenerTodosLosFormatos();
            cboFormato.DisplayMember = "pDescripcion";
            cboFormato.ValueMember = "pidFormato";
        }

    }
}
